package com.dongdongshop.serviceimpl;

import com.alibaba.dubbo.config.annotation.Service;
import com.dongdongshop.mapper.TbCitiesMapper;
import com.dongdongshop.pojo.TbCities;
import com.dongdongshop.pojo.TbCitiesExample;
import com.dongdongshop.service.TbcitiesService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service
@org.springframework.stereotype.Service
public class TbcitiesServiceImpl implements TbcitiesService {
@Autowired
private TbCitiesMapper tbCitiesMapper;

    //根据id查询下一级地区（市）
    @Override
    public List<TbCities> selectTbcitiesByProvinceId(String id) {
        TbCitiesExample te = new TbCitiesExample();
        TbCitiesExample.Criteria criteria = te.createCriteria();
        criteria.andProvinceidEqualTo(id);
        List<TbCities> tbCities = tbCitiesMapper.selectByExample(te);
        return tbCities;
    }
}
